﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WorkflowWizart.Lib.Entities;
using WorkflowWizart.Lib.Utility.Costants;

namespace WorkflowWizart.Lib
{
    public class AppGlobals
    {
        public static List<Entities.OperationCommand> OperationCommands { get; set; }
        public static void FillOperations()
        {
            OperationCommands = new List<OperationCommand>();
            OperationCommandCategory category_Operations = new OperationCommandCategory();
            category_Operations.DisplayName = "İşlemler";
            category_Operations.Name = "1";



            OperationCommand command_Trim = new OperationCommand();
            command_Trim.FullClassName = typeof(Operations.VariableOperations).FullName;
            command_Trim.Name = "Trim";
            command_Trim.DisplayName = "Baştan sondan boşluk sil";
            command_Trim.CategoryId = category_Operations.Name;
            command_Trim.ReturnType = ReturnTypes.Value;
            command_Trim.CommandParameters.Add(
                    new OperationCommandParameter() { Name = "Değer", ParameterType = ReturnTypes.Value }
            );
            OperationCommands.Add(command_Trim);


            OperationCommand command_IsNullOrEmpty = new OperationCommand();
            command_IsNullOrEmpty.FullClassName = typeof(Operations.VariableOperations).FullName;
            command_IsNullOrEmpty.Name = "IsNullOrEmpty";
            command_IsNullOrEmpty.DisplayName = "Boşmu kontrolü yap";
            command_IsNullOrEmpty.CategoryId = category_Operations.Name;
            command_IsNullOrEmpty.ReturnType = ReturnTypes.Value;
            command_IsNullOrEmpty.CommandParameters.Add(
                    new OperationCommandParameter() { Name = "Değer", ParameterType = ReturnTypes.Value }
            );
            OperationCommands.Add(command_IsNullOrEmpty);


            OperationCommand command_ToUpperCase = new OperationCommand();
            command_ToUpperCase.FullClassName = typeof(Operations.VariableOperations).FullName;
            command_ToUpperCase.Name = "ToUpperCase";
            command_ToUpperCase.DisplayName = "Büyük harfe çevir";
            command_ToUpperCase.CategoryId = category_Operations.Name;
            command_ToUpperCase.ReturnType = ReturnTypes.Value;
            command_ToUpperCase.CommandParameters.Add(
                    new OperationCommandParameter() { Name = "Değer", ParameterType = ReturnTypes.Value }
            );
            OperationCommands.Add(command_ToUpperCase);


            OperationCommand command_ToLowerCase = new OperationCommand();
            command_ToLowerCase.FullClassName = typeof(Operations.VariableOperations).FullName;
            command_ToLowerCase.Name = "ToLowerCase";
            command_ToLowerCase.DisplayName = "Küçük harfe çevir";
            command_ToLowerCase.CategoryId = category_Operations.Name;
            command_ToLowerCase.ReturnType = ReturnTypes.Value;
            command_ToLowerCase.CommandParameters.Add(
                    new OperationCommandParameter() { Name = "Değer", ParameterType = ReturnTypes.Value }
            );
            OperationCommands.Add(command_ToLowerCase);

            OperationCommand command_Add = new OperationCommand();
            command_Add.FullClassName = typeof(Operations.VariableOperations).FullName;
            command_Add.Name = "Add";
            command_Add.DisplayName = "Ekle";
            command_Add.CategoryId = category_Operations.Name;
            command_Add.ReturnType = ReturnTypes.Value;
            command_Add.CommandParameters.Add(
                    new OperationCommandParameter() { Name = "Değer", ParameterType = ReturnTypes.Value }
            );
            command_Add.CommandParameters.Add(
                    new OperationCommandParameter() { Name = "Eklenecek Değer", ParameterType = ReturnTypes.Value }
            );
            OperationCommands.Add(command_Add);
        }
    }
}
